import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { NgZorroAntdModule } from 'ng-zorro-antd';

import { StoreModule } from '@ngrx/store';
import { EffectsModule } from '@ngrx/effects';

import { reducers, effects } from './store';

import { NgxOlModule } from '../ngx-ol';
import { ResourceTreeModule, LayersManagementModule, DataTableModule, FeaturePropertyModule } from './components';

import { MapRoutingModule } from './map-routing.module';
import { MapComponent } from './containers';
import { SearchComponent } from './components/search/search.component';
import { CityComponent } from './components/city/city.component';
import { ZoomComponent } from './components/zoom/zoom.component';
import { InformationComponent } from './components/information/information.component';
import { FoldingContainerComponent } from './components/folding-container/folding-container.component';
import { BasemapsComponent } from './components/basemaps/basemaps.component';

import { services } from './services';
import { SideComponentContainerComponent } from './components/side-component-container/side-component-container.component';
import { MapMeasureContianerComponent } from './components/map-measure-contianer/map-measure-contianer.component';
import { ImportDataComponent } from './components/import-data/import-data.component';
import { MapMarkerComponent } from './components/map-marker/map-marker.component';
import { PropertiesComponent } from './components/properties/properties.component';
import { DrawToolComponent } from './components/draw-tool/draw-tool.component';
import { BufferComponent } from './components/buffer/buffer.component';
import { InteractionDrawComponent } from './components/interaction-draw/interaction-draw.component';
import { SharedModule } from '../shared';
import { PropertiesQueryModule } from './components/properties-query';
import { InputMarkComponent } from './components/input-mark/input-mark.component';
import { DrawingFeaturePopoverComponent } from './components/drawing-feature-popover/drawing-feature-popover.component';
import { NgxOlUploadOverlayModule } from '../ngx-ol-upload-overlay';

@NgModule({
  imports: [
    CommonModule,
    FormsModule, 
    ReactiveFormsModule,
    NgZorroAntdModule,
    SharedModule,
    MapRoutingModule,
    NgxOlModule,
    ResourceTreeModule,
    LayersManagementModule,
    DataTableModule,
    FeaturePropertyModule,
    PropertiesQueryModule,
    NgxOlUploadOverlayModule,
    StoreModule.forFeature('mapModule', reducers),
    EffectsModule.forFeature(effects)
  ],
  declarations: [
    MapComponent, 
    SearchComponent, 
    CityComponent, 
    ZoomComponent, 
    InformationComponent, 
    FoldingContainerComponent, 
    BasemapsComponent, 
    SideComponentContainerComponent, MapMeasureContianerComponent, ImportDataComponent, MapMarkerComponent, PropertiesComponent, DrawToolComponent, BufferComponent, InteractionDrawComponent, InputMarkComponent, DrawingFeaturePopoverComponent
  ],
  entryComponents: [SideComponentContainerComponent, ImportDataComponent, PropertiesComponent, DrawingFeaturePopoverComponent],
  providers: [...services]
})
export class MapModule { }
